VS Code extension with support for Visual Studio Code web (github.dev, vscode.dev)#51
Open
VS Code extension with support for Visual Studio Code web (github.dev, vscode.dev)#51
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: undefined
This commit implements a complete VS Code extension that integrates with the Deep Assistant API Gateway, enabling AI assistance directly in VS Code including web-based editors like github.dev and vscode.dev. Features: - Full web extension support for github.dev and vscode.dev - Integrated chat interface in VS Code sidebar - Support for multiple AI models (GPT-4o, Claude, DeepSeek, etc.) - Token-based authentication and energy tracking - Commands for chat, model selection, and settings - Dual build configuration (desktop and web) Technical implementation: - TypeScript with strict mode - Webpack bundling for both Node.js and WebWorker targets - VS Code Webview API for chat interface - Fetch API for web-compatible HTTP requests - Configuration-based API endpoint and token management Files added: - package.json: Extension manifest with contributions - src/extension.ts: Desktop extension entry point - src/web/extension.ts: Web extension entry point - src/apiClient.ts: API integration layer - src/chatViewProvider.ts: Chat UI implementation - webpack.config.js: Build configuration for both targets - tsconfig.json, .eslintrc.json, .prettierrc.json: Development configs - .vscodeignore: Extension packaging rules - resources/icon.svg: Extension icon - EXTENSION_README.md: Comprehensive documentation Fixes #26 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 📎 Log file uploaded as GitHub Gist (327KB) Now working session is ended, feel free to review and add any feedback on the solution draft. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a complete VS Code extension that brings Deep Assistant AI capabilities directly into Visual Studio Code, with full support for web-based editors like github.dev and vscode.dev.
Key Features
✅ Web Extension Support - Works seamlessly on github.dev and vscode.dev in the browser
✅ Integrated Chat Interface - Beautiful chat panel in VS Code sidebar with VS Code theming
✅ Multiple AI Models - Support for GPT-4o, Claude, DeepSeek, o1-preview, and more
✅ API Integration - Connects to Deep Assistant API Gateway with token-based auth
✅ Energy Tracking - Shows token usage and energy consumption
✅ Dual Build - Separate bundles for desktop (Node.js) and web (WebWorker)
Implementation Details
Architecture
The extension follows VS Code's web extension guidelines:
src/extension.ts→dist/extension.js(Node.js target)src/web/extension.ts→dist/web/extension.js(WebWorker target)apiClient.tsandchatViewProvider.tswork in both environmentsAPI Integration
Integrates with the api-gateway:
/v1/chat/completionsendpoint (OpenAI-compatible)File Structure
Commands
deepAssistant.chat- Open chat paneldeepAssistant.clearChat- Clear conversation historydeepAssistant.selectModel- Choose AI modeldeepAssistant.showSettings- Open extension settingsConfiguration
Users can configure:
deepAssistant.apiBaseUrl- API Gateway URLdeepAssistant.apiToken- Authentication tokendeepAssistant.defaultModel- Preferred AI modeldeepAssistant.systemMessage- Custom system promptdeepAssistant.showTokenUsage- Display energy usageTechnical Highlights
Testing Instructions
Local Testing (Desktop)
Web Testing (github.dev simulation)
Real github.dev Testing
npm run package-webnpx serve --cors -l 5000 --ssl-cert cert.pem --ssl-key key.pemhttps://localhost:5000Future Enhancements
Documentation
Fixes
Closes #26
🤖 This PR was created with Claude Code